package com.zhima.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zhima.enums.ContestType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author zhima
 * @since 2024-01-18
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("oj_contest")
@ApiModel(value = "OjContest对象", description = "")
public class OjContest implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("比赛id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty("比赛名")
    @TableField("title")
    private String title;

    @ApiModelProperty("描述")
    @TableField("description")
    private String description;

    @ApiModelProperty("邀请码")
    @TableField("invite_code")
    private String inviteCode;

    @ApiModelProperty("比赛类型（OI、IOI、ACM）")
    @TableField(value = "type")
    private ContestType type;

    @ApiModelProperty("开始时间")
    @TableField("begin_time")
    private Date beginTime;

    @ApiModelProperty("结束时间")
    @TableField("end_time")
    private Date endTime;

    @ApiModelProperty("比赛持续时间(分钟)")
    @TableField("duration")
    private Long duration;

    @ApiModelProperty("报名人数")
    @TableField("apply_num")
    private Integer applyNum;

    @ApiModelProperty("题目总数")
    @TableField("question_num")
    private Integer questionNum;

    @ApiModelProperty("举办者id")
    @TableField("holder_id")
    private Long holderId;

    @ApiModelProperty("举办者哟怒骂")
    @TableField("holder_name")
    private String holderName;

}
